package com.wyzy.book.controller;

import com.wyzy.book.model.Book;
import com.wyzy.book.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/book")
public class BookController {
    @Autowired
    private BookService bookService;
    @RequestMapping("/list")
    public List<Book> getList(){
        List<Book> books = bookService.getBookList();
        return books;
    }
}
